const db = require('../db/index');
const DataTypes = require('sequelize');
/**es6继承 */
class Roles extends DataTypes.Model {}
Roles.init(
    {
        id: {
            type: DataTypes.INTEGER,
            allowNull: false,
            autoIncrement: true,
            primaryKey: true
        },
        role: {
            type: DataTypes.STRING,
            comment: '权限',
            allowNull: false
        },
        menu: {
            type: DataTypes.TEXT,
            comment: '菜单表',
            allowNull: false
        },
        menuMap: {
            type: DataTypes.STRING,
            comment: 'map',
            allowNull: false
        },
        remake: {
            type: DataTypes.STRING,
            comment: '备注',
            allowNull: false
        }
    },
    {
        tableName: 'roles',
        modelName: 'role',
        sequelize: db
    }
);
// Roles.sync({ force: true });
exports['default'] = Roles;
